package com.ruoyi.system.mapper;

import java.util.List;
import com.ruoyi.system.domain.MbtiAnswer;
import org.apache.ibatis.annotations.Param;

/**
 * MBTI答题记录Mapper接口
 * 
 * @author ruoyi
 * @date 2025-01-21
 */
public interface MbtiAnswerMapper 
{
    /**
     * 查询MBTI答题记录
     * 
     * @param answerId MBTI答题记录主键
     * @return MBTI答题记录
     */
    public MbtiAnswer selectMbtiAnswerByAnswerId(Long answerId);

    /**
     * 查询MBTI答题记录列表
     * 
     * @param mbtiAnswer MBTI答题记录
     * @return MBTI答题记录集合
     */
    public List<MbtiAnswer> selectMbtiAnswerList(MbtiAnswer mbtiAnswer);

    /**
     * 根据测试记录ID查询答题记录列表
     * 
     * @param recordId 测试记录ID
     * @return MBTI答题记录集合
     */
    public List<MbtiAnswer> selectAnswersByRecordId(Long recordId);

    /**
     * 根据测试记录ID和题目ID查询答题记录
     * 
     * @param recordId 测试记录ID
     * @param questionId 题目ID
     * @return MBTI答题记录
     */
    public MbtiAnswer selectAnswerByRecordIdAndQuestionId(@Param("recordId") Long recordId, @Param("questionId") Long questionId);

    /**
     * 新增MBTI答题记录
     * 
     * @param mbtiAnswer MBTI答题记录
     * @return 结果
     */
    public int insertMbtiAnswer(MbtiAnswer mbtiAnswer);

    /**
     * 修改MBTI答题记录
     * 
     * @param mbtiAnswer MBTI答题记录
     * @return 结果
     */
    public int updateMbtiAnswer(MbtiAnswer mbtiAnswer);

    /**
     * 删除MBTI答题记录
     * 
     * @param answerId MBTI答题记录主键
     * @return 结果
     */
    public int deleteMbtiAnswerByAnswerId(Long answerId);

    /**
     * 批量删除MBTI答题记录
     * 
     * @param answerIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteMbtiAnswerByAnswerIds(Long[] answerIds);

    /**
     * 根据测试记录ID删除答题记录
     * 
     * @param recordId 测试记录ID
     * @return 结果
     */
    public int deleteAnswersByRecordId(Long recordId);
}
